package com.example.jiaopin.Service;
import com.example.jiaopin.Mapper.CourseMapper;
import com.example.jiaopin.model.Course;
import com.example.jiaopin.model.User;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class CourseService {
    @Autowired
    private CourseMapper courseMapper;

    public Course getCourseById(Integer courseID) {
        return courseMapper.getCourseById(courseID);
    }

    public void insertCourse(Course course) {
        courseMapper.insertCourse(course);
    }

    public void updateCourse(Course course) {
        courseMapper.updateCourse(course);
    }

    public void deleteCourse(Integer courseID) {
        courseMapper.deleteCourse(courseID);
    }
}